package commons.base.http.example;

import commons.base.http.SSLBuilder;
import commons.base.http.SimpleHttpClient;

public class HttpsExample {

	public static void main(String[] args)throws Exception {
		new SSLBuilder().useAllowAllTrust().setJDKDefaultHttps();

		SimpleHttpClient.HttpResponse response = SimpleHttpClient.newGet("https://www.taobao.com/").execute();
		System.err.println(response.getCode());
		for(String name : response.getHeaderMap().keySet()){
			System.err.println(name + " : " + response.getHeaderMap().get(name));
		}
		System.err.println("===========================");
//		System.err.println(response.getBody());
	}

}
